module DocumentsHelper

  def has_invisibles?(documents)
    documents.inject(false){|has, document| has = true unless visible?(document); has}
  end
  
  def visible?(document)
    document.public || user?;
  end

end